package com.kaikai.edu.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kaikai.edu.entity.EduEmail;
import com.kaikai.edu.entity.ao.EduEmailQueryAO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yujiankai
 * @since 2022-01-05
 */
@Repository
public interface EmailMapper {

    /**
     * @param eduEmail
     * @return int
     * @Author yujiankai
     * @Description 添加邮件发送记录
     * @date 2022/1/5 9:43
     */
   int insertEmailSendRec(EduEmail eduEmail);

   /**
    * @param Page
	 * @param emailQueryAo
    * @return com.baomidou.mybatisplus.core.metadata.IPage<com.kaikai.edu.entity.EduEmail>
    * @Author yujiankai
    * @Description 分页条件查询邮件发送记录
    * @date 2022/1/5 9:55
    */
    IPage<EduEmail> getEmailSendRecList(Page<EduEmailQueryAO> Page, @Param("eduEmailQueryAO") EduEmailQueryAO emailQueryAo);

    /**
     * @param eduEmail
     * @return int
     * @Author yujiankai
     * @Description 更新发送记录
     * @date 2022/1/6 14:09
     */
    int updateEmailSendRec(EduEmail eduEmail);

    /**
     * @param emailId
     * @return com.kaikai.edu.entity.EduEmail
     * @Author yujiankai
     * @Description 根据邮件发送id查询发送记录
     * @date 2022/1/21 14:16
     */
    EduEmail getEmailSendRecById(String emailId);
}
